package com.wanmait.recruitment.webController;

import com.wanmait.recruitment.pojo.Friendly;
import com.wanmait.recruitment.service.FriendlyService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("zhuang/friendly")
public class FriendlyController {
    @Resource
    private FriendlyService friendlyService;

    @RequestMapping("list")
    @ModelAttribute("friendlies")
    public List<Friendly> friendlyList(){
        return friendlyService.findAll();
    }
}
